<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('/shell',"ShellController@index");
Route::get('admin/index/index','Admin\IndexController@index');


//Admin模块
Route::group(['namespace'=>'Admin','prefix'=>'admin',],function(){
    Route::group(['prefix'=>'article'],function(){
        Route::get('index','ArticleController@index');

        Route::get('detail/{id}','ArticleController@detail');
        Route::get('create','ArticleController@create');
        Route::get('delete','ArticleController@delete');
    });

    Route::group(['prefix'=>'category'],function(){
        Route::get('index','CategoryController@index');
        Route::get('create','CategoryController@create');
    });

    Route::group(['prefix'=>'user'],function(){
        Route::get('index','UserController@index');
        Route::get('create','UserController@create');
        Route::post('store','UserController@store');
        Route::get('edit/{id}','UserController@edit');
        Route::post('update/{id}','UserController@update');
        Route::get('delete/{id}','UserController@delete');
    });
});